package com.example.spinning.mapper;

import com.example.spinning.bean.endProductStock;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.sql.Timestamp;
import java.util.List;

@Mapper
public interface EndProductStockMapper {

    //得到成品库存表
    //List<endProductStock> getEndProductStock();
    //分页加入试一下
    List<endProductStock> getEndProductStock(@Param("start") Integer start, @Param("count") Integer count);

    //根据id查找产品
    endProductStock getEndProduceStockById(Long id);

    //根据条件查询产品
    List<endProductStock> getEndProductStockByCondition(
            @Param("start") Integer start,
            @Param("count") Integer count,
            @Param("name") String name,
            @Param("batch_no")  String batch_no,
            @Param("norms") String norms,
            @Param("date") String date
            );

    //查询表的行数
    int getCountEndProductStock();

    //由条件查询表的行数
    int getCountEndProductStockByCondition(
            @Param("name") String name,
            @Param("batch_no")  String batch_no,
            @Param("norms") String norms,
            @Param("date")  String date
    );

    //成品库存表内容的增加
    int addEndProductStock(endProductStock productStock);

    //修改
    int updateEndProduceStockById(endProductStock productStock);

    //删除
    int delEndProductStockById(@Param("ids") String[] ids);

    //void pvIncrement(String name);

}
